package java3_20;
//轿车类 子类
public class Salooncar extends Car{
private String MotoVehicle;

    public Salooncar(String carNumber, double money, boolean flag, int seatCount, String type, String MotoVehicle) {
        super(carNumber, money, flag, seatCount,type);
        this.MotoVehicle = MotoVehicle;

    }
    public String getMotoVehicle() {
        return MotoVehicle;
    }

    public void setMotoVehicle(String motoVehicle) {
        MotoVehicle = motoVehicle;
    }

    @Override
    public void show() {
        System.out.println( this.MotoVehicle+","+  this.getType() + "," + this.getCarNumber() + "," + this.getSeatCount()
                + ","+"日租金" + this.getMoney() +"￥"+ "," + this.isFlag());
    }

    @Override
    void showRentResult() {
        if (this.getMotoVehicle().equals("轿车")){
        System.out.println("您租赁的车型是："+getMotoVehicle()+","+"车牌号是:"+this.getCarNumber()+","+this.getSeatCount()+"座");
    }
    }

    @Override
    void leaseOutFlow(String a) {
        if (a.equals("轿车")){
        System.out.println(this.MotoVehicle+","+  this.getType() + "," + this.getCarNumber() + "," + this.getSeatCount()
                + "," + this.getMoney() + "," + this.isFlag());    }
    }
}
